﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace University.Workshop.Presenters.WaterPurchase
{
    public class PresenterSecondStepForRegisterWaterPurchase
    {
        ISecondStepForRegisterWaterPurchase view;

        public PresenterSecondStepForRegisterWaterPurchase(ISecondStepForRegisterWaterPurchase view)
        {
            this.view = view;
        }

        public void UpdateData()
        {
            view.Amount = view.WaterPurchaseToRegister.Amount;
            view.DatePurchase = view.WaterPurchaseToRegister.DatePurchase;
            view.Courtesy = view.WaterPurchaseToRegister.Courtesy;
            view.TotalPrice = view.WaterPurchaseToRegister.TotalPrice;
        }

        public void ChargeDataUser()
        {
            view.WaterPurchaseToRegister.Amount = view.Amount;
            view.WaterPurchaseToRegister.DatePurchase = view.DatePurchase;
            view.WaterPurchaseToRegister.Courtesy = view.Courtesy;
            view.WaterPurchaseToRegister.TotalPrice = view.TotalPrice;
        }
    }
}
